package cn.ylz.ylmall.order.dao.persist.repository.impl;

import cn.ylz.ylmall.order.dao.persist.mapper.OrderItemMapper;
import cn.ylz.ylmall.order.dao.persist.repository.OrderItemRepository;
import cn.ylz.ylmall.order.pojo.entity.OrderItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


@Slf4j
@Repository
public class OrderItemRepositoryImpl implements OrderItemRepository {

    @Autowired
    private OrderItemMapper orderItemMapper;

    @Override
    public int insert(OrderItem orderItem) {
        log.debug("开始处理增加订单商品请求");
        return orderItemMapper.insert(orderItem);
    }

    @Override
    public OrderItem selectByOrderNo(String orderNo) {
        log.debug("开始处理查询订单商品请求");
        return orderItemMapper.selectByOrderNo(orderNo);
    }


}
